package com.gtt.jr.repository.base;

import java.util.List;

import com.gtt.jr.repository.domain.base.BaseDomain;

public interface BaseDao<T extends BaseDomain> {

	T load(Long id);

	T load(String propertyName, Object propertyValue);

	T load(String[] propertyNames, Object[] propertyValues);

	void save(T entity);

	void delete(Long id);
	
	void delete(T entity);

	List<T> find(String sql);

	List<T> findAll(String... orderProperties);

	List<T> find(String propertyName, Object propertyValue);

	List<T> find(String[] propertyNames, Object[] propertyValues);

	@SuppressWarnings("unchecked")
	List find(String queryStr, Object[] positionalParameters);

	List<T> find(Class<T> clazz, String queryStr, Object[] positionPrameters);

	// Object findUnique(String queryStr, Object[] positionPrameters);

}
